package com.yulongtian.oneProblemEveryDay.month202212;

/**
 * https://leetcode.cn/problems/determine-color-of-a-chessboard-square/
 * 可
 *
 * @author yulongTian
 * @create 2022-12-08 10:42
 */
public class Test04 {
    public static void main(String[] args) {

    }

    public boolean squareIsWhite(String coordinates) {
        int x = coordinates.charAt(0) - 'a' + 1;
        int y = coordinates.charAt(1) - '0';

        if (x == y) {
            return false;
        }

        if ((x & 1) == 0 && (y & 1) == 0 || (x & 1) == 1 && (y & 1) == 1) {
            //都是偶数
            return false;
        }


        return true;
    }

}
